package cn.wolfcode.crm.web.controller;


import cn.wolfcode.crm.query.PageResult;
import cn.wolfcode.crm.query.PaymentResultQueryObject;
import cn.wolfcode.crm.service.IPaymentResultService;
import cn.wolfcode.crm.util.PermissionName;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * @author konki
 * @time 2018年6月19日 下午7:03:47
 * @email konki@qq.com
 * @description
 */
@Controller
@RequestMapping("paymentResult")
public class PaymentResultController {
    @Autowired
    private IPaymentResultService service;

    @RequestMapping("")
    @PermissionName("收费查询首页")
    @RequiresPermissions("paymentResult:index")
    public String index() {
        return "paymentResult/list";
    }

    @RequestMapping("list")
    @PermissionName("收费查询列表")
    @RequiresPermissions("paymentResult:list")
    @ResponseBody
    public PageResult list(PaymentResultQueryObject qo) {
        return service.query(qo);
    }
}
